import QtQuick 2.0
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import  Quick.UIComponent.Text.ShineText  0.1
import Quick.SystemComponent.FontLoader 0.1
import  Quick.UIComponent.Text.Normal  0.1
import Quick.SystemComponent.Theme 0.1
import  Quick.UIComponent.Text.Link  0.1


Page{
    id:root
    title: qsTr("文本")


    Flow{
        anchors.fill: parent
        anchors.margins: 4
        spacing: 40
        flow:Flow.TopToBottom

        Text {
            text: qsTr("我是原生Text1!")
            font.pixelSize: 24
            color: Theme.textColor
        }
        Text {
            text: qsTr("我是原生Text2!")
            font.pixelSize: 24
            color: "white"
        }
        Label{
            text: qsTr("我是原生Lable!")
            font.pixelSize: 24
        }

        ShineText{
            text: ">滑动以解锁"
            bold: false
            pxSize:24
            fontFamily:Family.siyuan.name
        }

        MText{
            text: "我是思源字体"
            bold: false
            pxSize:24
            fontFamily:Family.siyuan.name
        }
        MText{
            text: "我是字魂字体"
            bold: false
            pxSize:24
            fontFamily:Family.zihun43.name
        }
        MText{
            text: "我是旁门正道字体"
            bold: false
            pxSize:24
            fontFamily:Family.pmzd.name
        }

        MText{
            id:linkLabel
            text: "没有点击"
            bold: true
            pxSize:24
            fontFamily:Family.pmzd.name
        }


        LinkText{
            text: "我是按钮"
            pxSize:24
            fontFamily:Family.pmzd.name
            onClicked: {
                linkLabel.text === "没有点击" ? linkLabel.text ="您点击了":linkLabel.text ="没有点击"
            }
        }


    }

    footer:MenuBar{
        Menu {
            title: qsTr("底部菜单1")
            Action { text: qsTr("New...") }
            Action { text: qsTr("Open...") }
            Action { text: qsTr("Save") }
            Action { text: qsTr("Save &As...") }
            MenuSeparator { }
            Action { text: qsTr("Quit") }
        }
        Menu {
            title: qsTr("底部菜单2")
            Action { text: qsTr("Cu&t") }
            Action { text: qsTr("&Copy") }
            Action { text: qsTr("&Paste") }
            MenuSeparator { }
            Action { text: qsTr("Quit") }
        }
        Menu {
            title: qsTr("底部菜单3")
            Action { text: qsTr("&About") }
            MenuSeparator { }
            Action { text: qsTr("Quit") }
        }
    }

}
